php session regenerate id

46

php session regenerate id -

<?php
session_start();

$old_sessionid = session_id();

session_regenerate_id();

$new_sessionid = session_id();

echo "Old Session: $old_sessionid<br />";
echo "New Session: $new_sessionid<br />";
?>

session_regenerate_id -

if(session_status() == PHP_SESSION_ACTIVE)
{
    session_regenerate_id();
}

Comments

Submit
0 Comments